Unset the displayed row when unsetting the model. (#138560, Christian
authorMatthias Clasen <maclas@gmx.de>
Sat, 3 Jul 2004 03:37:44 +0000 (03:37 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 3 Jul 2004 03:37:44 +0000 (03:37 +0000)
Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
row when unsetting the model.  (#138560, Christian Persch)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 11aad041e2d93768acf12b00690300433a5208d0..99d12da1f084b9ab07f6f78b9755925a36c9eec8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
+       row when unsetting the model.  (#138560, Christian Persch)
+
+Fri Jul  2 23:01:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (update_menu_sensitivity): Don't crash if there
+       are no items.
+
 Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
index 11aad041e2d93768acf12b00690300433a5208d0..99d12da1f084b9ab07f6f78b9755925a36c9eec8 100644 (file)
@@ -1,3 +1,13 @@
+Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
+       row when unsetting the model.  (#138560, Christian Persch)
+
+Fri Jul  2 23:01:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (update_menu_sensitivity): Don't crash if there
+       are no items.
+
 Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
index 11aad041e2d93768acf12b00690300433a5208d0..99d12da1f084b9ab07f6f78b9755925a36c9eec8 100644 (file)
@@ -1,3 +1,13 @@
+Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
+       row when unsetting the model.  (#138560, Christian Persch)
+
+Fri Jul  2 23:01:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (update_menu_sensitivity): Don't crash if there
+       are no items.
+
 Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
index 11aad041e2d93768acf12b00690300433a5208d0..99d12da1f084b9ab07f6f78b9755925a36c9eec8 100644 (file)
@@ -1,3 +1,13 @@
+Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
+       row when unsetting the model.  (#138560, Christian Persch)
+
+Fri Jul  2 23:01:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (update_menu_sensitivity): Don't crash if there
+       are no items.
+
 Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
index 2e286dbda6681ef2f9e9bed3d839b8b3e810f1f0..613b12f9342d172d106dbad1620f355e0dca7453 100644 (file)
@@ -1266,7 +1266,7 @@ update_menu_sensitivity (GtkComboBox *combo_box)
   children = gtk_container_get_children (GTK_CONTAINER (menu));
   child = children;
 
-  if (GTK_IS_TEAROFF_MENU_ITEM (child->data))
+  if (child && GTK_IS_TEAROFF_MENU_ITEM (child->data))
     child = child->next;
 
   for (i = 0; i < items; i++, child = child->next)
@@ -1692,6 +1692,9 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box)
       g_object_unref (G_OBJECT (combo_box->priv->model));
       combo_box->priv->model = NULL;
     }
+
+  if (combo_box->priv->cell_view)
+    gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (combo_box->priv->cell_view), NULL);
 }
 
 static void